package student

import "fmt"

type person struct {
	name string
	age  int
}

// 演示函数
func OOBDemo() {

	var wangdengcan person
	wangdengcan.name = "汪登灿"
	wangdengcan.age = 19
	// 语法糖
	// 下面这个等同于上面
	// 	var wangdengcan = person{
	// 		name: "汪登灿",
	// 		age: 19,
	// 	}
	fmt.Println("他的名字是:", wangdengcan.name)
	fmt.Println("他的年龄是:", wangdengcan.age, "岁")

	var muxiaohan person
	muxiaohan.name = "慕筱晗"
	muxiaohan.age = 20
	fmt.Println("她的名字是:", muxiaohan.name)
	fmt.Println("她的年龄是:", muxiaohan.age, "岁")

}
